
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type UserEnterRequest struct {

	Uid string `json:"uid" form:"uid"`

	Province string `json:"province" form:"province"`

	City string `json:"city" form:"city"`

	District string `json:"district" form:"district"`

	Address string `json:"address" form:"address"`

	MerchantName string `json:"merchant_name" form:"merchant_name"`

	LinkUser string `json:"link_user" form:"link_user"`

	LinkTel string `json:"link_tel" form:"link_tel"`

	Charter string `json:"charter" form:"charter"`

	AddTime string `json:"add_time" form:"add_time"`

	ApplyTime string `json:"apply_time" form:"apply_time"`

	SuccessTime string `json:"success_time" form:"success_time"`

	FailMessage string `json:"fail_message" form:"fail_message"`

	FailTime string `json:"fail_time" form:"fail_time"`

	Status string `json:"status" form:"status"`

	IsLock string `json:"is_lock" form:"is_lock"`

	IsDel string `json:"is_del" form:"is_del"`

}

func (r *UserEnterRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *UserEnterRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"uid": "required",

		"province": "required",

		"city": "required",

		"district": "required",

		"address": "required",

		"merchant_name": "required",

		"link_user": "required",

		"link_tel": "required",

		"charter": "required",

		"add_time": "required",

		"apply_time": "required",

		"success_time": "required",

		"fail_message": "required",

		"fail_time": "required",

		"status": "required",

		"is_lock": "required",

		"is_del": "required",

	}
}

func (r *UserEnterRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *UserEnterRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *UserEnterRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
